package com.dude.screens;

import com.dude.R;
import com.dude.R.id;
import com.dude.R.layout;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.Button;


public class ProfilesManager extends Activity {
	
	//============= widgets====================================
	protected Button new_object_button;
	protected Button new_multiobject_button;
	protected Button watch_profiles_button;
	

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.profiles_manager);
        
        // find buttons from the xml layout
        new_object_button = (Button)findViewById(R.id.create_object_button_id);
        new_multiobject_button = (Button)findViewById(R.id.create_multiobject_button_id);
        watch_profiles_button = (Button)findViewById(R.id.view_profiles_button_id);
        
        // create listeners to the buttons
        new_object_button.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
	            Intent i = new Intent(ProfilesManager.this, ExtendedSingleProfile.class);
	            i.putExtra(Profiles.isNewProfile, true);
	            startActivity(i);
            }
        });
        
        new_multiobject_button.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
	            Intent i = new Intent(ProfilesManager.this, ExtendedMultiObject.class);
	            i.putExtra(Profiles.isNewProfile, true);
	            startActivity(i);
            }
        });
        
        watch_profiles_button.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
	            Intent i = new Intent(ProfilesManager.this, Profiles.class);
	            startActivity(i);
            }
        });
        
    }
    
    
    
}
